using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DataAccess.Mapping;
using Entity.StoreProcedure;
namespace BusinessObjects.BO_Actions.Trash
{
	public class BOTrash_Delete_Threads
	{
		/// <summary>
		/// Thuc thi store : usp_Trash_Threads_Delete. Kieu du lieu tra ve la : DataTable
		/// </summary>
		public DataTable ExecuteAndReturnDataTable(usp_Trash_Threads_Delete _entity)
		{
			DataTable objDT = new DataTable();
			StoreProcedure<usp_Trash_Threads_Delete> _action = new StoreProcedure<usp_Trash_Threads_Delete>();
			try
			{
				objDT = _action.ExecuteSPAndReturnDataTable(_entity, typeof(usp_Trash_Threads_Delete));
			}
			catch (Exception ex)
			{
				throw ex;
			}

			return objDT;
		}

		/// <summary>
		/// Thuc thi store : usp_Trash_Threads_Delete. Kieu du lieu tra ve la : DataTable.
		/// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
		/// </summary>
		public DataTable ExecuteListDataAndReturnDataTable(List<usp_Trash_Threads_Delete> _listEntity)
		{
			DataTable objDT = new DataTable();
			foreach (usp_Trash_Threads_Delete _entity in _listEntity)
			{
				StoreProcedure<usp_Trash_Threads_Delete> _action = new StoreProcedure<usp_Trash_Threads_Delete>();
				try
				{
					objDT = _action.ExecuteSPAndReturnDataTable(_entity, typeof(usp_Trash_Threads_Delete));
				}
				catch (Exception ex)
				{
					throw ex;
				}

			}

			return objDT;
		}

		/// <summary>
		/// Thuc thi store : usp_Trash_Threads_Delete. Kieu du lieu tra ve la : bool
		/// </summary>
		public bool ExecuteAndReturnBooleanValue(usp_Trash_Threads_Delete _entity)
		{
			StoreProcedure<usp_Trash_Threads_Delete> _action = new StoreProcedure<usp_Trash_Threads_Delete>();
			try
			{
				_action.ExecuteSP(_entity, typeof(usp_Trash_Threads_Delete));
			}
			catch (Exception ex)
			{
				throw ex;
			}

			return true;
		}

		/// <summary>
		/// Thuc thi store : usp_Trash_Threads_Delete. Kieu du lieu tra ve la : bool.
		/// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
		/// </summary>
		public bool ExecuteListDataAndReturnBooleanValue(List<usp_Trash_Threads_Delete> _listEntity)
		{
			DataTable objDT = new DataTable();
			foreach (usp_Trash_Threads_Delete _entity in _listEntity)
			{
				StoreProcedure<usp_Trash_Threads_Delete> _action = new StoreProcedure<usp_Trash_Threads_Delete>();
				try
				{
					_action.ExecuteSPAndReturnDataTable(_entity, typeof(usp_Trash_Threads_Delete));
				}
				catch (Exception ex)
				{
					throw ex;
				}

			}

			return true;
		}

		/// <summary>
		/// Thuc thi store : usp_Trash_Threads_Delete. Kieu du lieu tra ve la : String.
		/// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
		/// </summary>
		public String ExecuteAndReturnStringValue(usp_Trash_Threads_Delete _entity)
		{
			string strReturn = null;
			StoreProcedure<usp_Trash_Threads_Delete> _action = new StoreProcedure<usp_Trash_Threads_Delete>();
			try
			{
				strReturn = _action.ExecuteSPAndReturnString(_entity, typeof(usp_Trash_Threads_Delete));
			}
			catch (Exception ex)
			{
				throw ex;
			}

			return strReturn;
		}

		/// <summary>
		/// Thuc thi store : usp_Trash_Threads_Delete. Kieu du lieu tra ve la : String.
		/// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
		/// </summary>
		public String ExecuteListDataAndReturnStringValue(List<usp_Trash_Threads_Delete> _listEntity)
		{
			string strReturn = null;
			foreach (usp_Trash_Threads_Delete _entity in _listEntity)
			{
				StoreProcedure<usp_Trash_Threads_Delete> _action = new StoreProcedure<usp_Trash_Threads_Delete>();
				try
				{
					strReturn = _action.ExecuteSPAndReturnString(_entity, typeof(usp_Trash_Threads_Delete));
				}
				catch (Exception ex)
				{
					throw ex;
				}

			}

			return strReturn;
		}

	}
}

